package com.xinchao.job.task;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.util.StopWatch;

import com.xinchao.job.service.DeviceLocationSyncJobService;


/**
 * 
 * <p>Title: DeviceDuplicatePropCheckJobService</p>  
 * <p>Description: 定期同步播了么点位所在地理位置信息</p>  
 * @author huangf 
 * @date 2018年9月27日
 */
@DisallowConcurrentExecution
public class DeviceLocationSyncJob extends QuartzJobBean{
	private static Logger logger = LoggerFactory.getLogger(DeviceLocationSyncJob.class);
	
	@Autowired
	private DeviceLocationSyncJobService deviceLocationSyncJobService;
	@Override
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		StopWatch stopWatch = new StopWatch();  
		stopWatch.start();
		deviceLocationSyncJobService.sync();
		stopWatch.stop();
		logger.info("【DeviceDuplicatePropCheckJobService】执行完毕，执行时间："+stopWatch.getTotalTimeSeconds());
	}

}